"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const maishu_node_mvc_1 = require("maishu-node-mvc");
const data_context_1 = require("./data-context");
const weixin_sdk_1 = require("./weixin-sdk");
exports.db = {};
exports.weixinDataContext = maishu_node_mvc_1.createParameterDecorator(async (a, b, serverContext) => {
    let dc = await data_context_1.createDataContext(serverContext.data.db);
    return dc;
});
// export let wx = new WeiXinSDK();
function createWeiXinSDK(config) {
    let wx = new weixin_sdk_1.WeiXinSDK();
    Object.assign(wx.config, config);
    return wx;
}
exports.createWeiXinSDK = createWeiXinSDK;
